<include file="Public:header" />
<!--主体内容-->
<!--左边-->
<div class="centent_box">
    <include file="Public:left" />
    <!--右边-->
    <div class="centent_right_box">
        <div class="centent_right rightCon">
            <div class="Mtitle">
                <ul>
                    <li class="on"><span>系统管理</span></li>
                </ul>
                <div class="rightWord"><a href="{:U('Set/role')}">配置参数</a> &gt;&gt; 设置</div>
            </div>
            <form id="info_form" action="{:U('Set/add_role')}" method="post" >
                <div class="con_div">
                    <ul class="formList width2 list_ul list_mp">
                        <volist name="configs" id="vo">
                            <li>
                                <span style="float:left;">{$vo.title} ：</span>
                                <input type="{$vo.type}" class="inputStyle width2" id="conf_{$vo.id}" value="{$vo.val}" >
                                <span class="tip">天</span>
                                <span class="tip"><button onclick="setVal({$vo.id})">保 存</button></span>
                            </li>
                            <!--li>
                                <label></label>
                                <input type="submit" value="提 交" class="btnStyle">
                            </li-->
                        </volist>
                    </ul>
                </div>
            </form>
        </div>
    </div>
</div>
<script src="__S__/js/jquery.validate.js"></script>
<script type="text/javascript">
    function setVal(id){
        event.preventDefault();
        window.event.returnValue;
        var url = "{:U('Ajax/setConfig')}";
        var val = $("#conf_"+id).val();
        var data = {id:id,val:val};
        $.post (url, data, function (response){
            if (response.state == 'ok'){
                layer.msg (response.msg,{icon: 1});
            }else {
                layer.msg (response.msg,{icon: 0});
                location.reload (1);
            }
        },'json');
    }

</script>
<include file="Public:footer" />